import request from '@/utils/request'

// 上传图片到后端，表单字段名必须为 image
export function policy(formData) {
  return new Promise((resolve, reject) => {
    request({
      url: '/thirdparty/oss/policy',
      method: 'post',
      data: formData,
      headers: { 'Content-Type': 'multipart/form-data' }
    }).then((response) => {
      resolve(response)
    }).catch((err) => {
      reject(err)
    })
  })
}
